fn main() {
    let r1 = Rectangle{
        width: 24,
        height: 10,
    };

    let r2 = Rectangle{
        width: 25,
        height: 11,
    };

    let r3 = Rectangle{
        width: 28,
        ..r2
    };
    println!("{:?}", r3);

    println!("r2 can hold r1 {}", r2.can_hold(&r1));
    println!("r1 can hold r2 {}", r1.can_hold(&r2));

    println!("{:#?}", r1);
    println!("{:#?}", r1);
    println!("{}", r1.area());
}

#[derive(Debug)]
struct Rectangle{
    width: u32,
    height: u32,
}

impl Rectangle{
    fn area(&self)->u32{
        return &self.width * &self.height;
    }

    fn can_hold(&self, that: &Rectangle)->bool{
        self.width > that.width && self.height>that.height
    }
}